package priv.abadstring.study.haoke.dubbo.api;

import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import priv.abadstring.study.haoke.dubbo.entity.HouseResources;
import priv.abadstring.study.haoke.dubbo.service.HouseResourcesService;
import priv.abadstring.study.haoke.dubbo.dto.PageInfo;

/**
 * HouseResourcesServerImpl
 *
 * @author aBadString
 * @date 2021-06-15 15:34:19
 */
@Service(version = "1.0.0")
public class HouseResourcesServerImpl implements HouseResourcesServer{
    @Autowired
    private HouseResourcesService houseResourcesService;

    @Override
    public int save(HouseResources houseResources) {
        return houseResourcesService.saveHouseResources(houseResources);
    }

    @Override
    public PageInfo<HouseResources> list(int page, int pageSize, HouseResources queryCondition) {
        return this.houseResourcesService.listHouseResources(page, pageSize, queryCondition);
    }

    @Override
    public HouseResources getById(Long id) {
        return this.houseResourcesService.getById(id);
    }

    @Override
    public boolean update(HouseResources houseResources) {
        return this.houseResourcesService.updateHouseResources(houseResources);
    }
}
